package com.ty.controller;

import com.ty.common.bean.ResultBean;
import com.ty.common.controller.BaseController;
import com.ty.service.CustomerInquiryDetailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@Api(tags = "客户询价明细")
@RestController
@RequestMapping("/api")
public class CustomerInquiryDetailController extends BaseController {

    @Autowired
    CustomerInquiryDetailService detailService;

    @ApiOperation("询价明细详情")
    @GetMapping("/inquiryDetail")
    public ResultBean get(@RequestParam(required = true) int id) {
        Map map = detailService.getDetail(id);
        return success("询价明细详情", map);
    }
}
